<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const bankArr = [
        {
            name: '中国银行',
            comCode: 207
        },
        {
            name: '邮储银行',
            comCode: 199
        },
        {
            name: '农业银行',
            comCode: 320
        },
        {
            name: '浦发银行',
            comCode: 188
        }
    ];
    bankArr.sort((a, b) => {
        return a.comCode - b.comCode;
    });
    console.log(bankArr);
</script>
</body>
</html>
